import { AnchorInfoTypeEntity } from '../entity/infoType';
import { AnchorInfoEntity } from '../entity/info';
import { DemoUserInfoEntity } from '../../demo/entity/info';
import { Init, App, Provide } from '@midwayjs/decorator';
import { BaseService, CoolTransaction } from '@cool-midway/core';
import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository, QueryRunner } from "typeorm";
import { IMidwayKoaApplication } from '@midwayjs/koa';
import { MemberUserInfoEntity } from "../../member/entity/info"

/**
 * anchor模块-主播信息
 */
@Provide()
export class AnchorInfoTypeService extends BaseService {

  @App()
  app: IMidwayKoaApplication;

  @InjectEntityModel(AnchorInfoEntity)
  anchorInfoEntity: Repository<AnchorInfoEntity>;

  @InjectEntityModel(AnchorInfoTypeEntity)
  anchorInfoTypeEntity: Repository<AnchorInfoTypeEntity>;

  @InjectEntityModel(DemoUserInfoEntity)
  demoUserInfoEntity: Repository<DemoUserInfoEntity>;

  @InjectEntityModel(MemberUserInfoEntity)
  memberUserInfoEntity: Repository<MemberUserInfoEntity>;

  @Init()
  async init() {
    await super.init();
    this.setEntity(this.anchorInfoEntity);
  }

}
